/***************************************************************************
 *   Copyright (C) 2007, 2008, 2009, 2010 by Lasse Liehu                   *
 *   lliehu@kolumbus.fi                                                    *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *   This program is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 *                                                                         *
 *   You should have received a copy of the GNU General Public License     *
 *   along with this program; if not, write to the                         *
 *   Free Software Foundation, Inc.,                                       *
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
 ***************************************************************************/

#include "aboutbox.h"

#include <QSvgWidget>
#include <QLabel>
#include <QHBoxLayout>
#include <QVBoxLayout>
#include <QPushButton>

AboutBox::AboutBox(QWidget *parent)
 : QDialog(parent)
{
    QLabel *appName = new QLabel(tr("<b>About Google Reader Notifier Qt 1.0.91</b>"));

    QSvgWidget *svgWidget = new QSvgWidget(":/grnotifqt.svg");
    svgWidget->setMinimumSize(QSize(96, 96));
    svgWidget->setMaximumSize(QSize(96, 96));
    svgWidget->resize(96, 96);
    QLabel *desc = new QLabel(tr("An application that notifies you of new unread items in Google Reader and that shows you the number of unread items in your reading list in your notification area."));
    desc->setWordWrap(true);
    QHBoxLayout *hLayout = new QHBoxLayout;
    hLayout->addWidget(svgWidget);
    hLayout->addWidget(desc);

    QLabel *copy = new QLabel(tr("Icons © 2009-2010 UltimateSephiroth\nEverything else © 2007-2010 Lasse Liehu") );

    QPushButton *okButton = new QPushButton(tr("OK"));
    connect(okButton, SIGNAL(clicked()), this, SLOT(close() ));

    QVBoxLayout *layout = new QVBoxLayout;
    layout->addWidget(appName);
    layout->addLayout(hLayout);
    layout->addWidget(copy);
    layout->addWidget(okButton);
    setLayout(layout);

    resize(minimumSizeHint() );
    setWindowTitle(tr("About Google Reader Notifier Qt"));
}

AboutBox::~AboutBox()
{
}

